﻿using Microsoft.Extensions.Caching.Distributed;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyCommon.Caches
{
    public interface ICaching
    {
        public IDistributedCache Cache { get; }

        bool Exists(string cacheKey);
        object Get(Type type, string cacheKey);
        void Set<T>(string cacheKey, T value, TimeSpan? expire = null);
    }
}
